<?php
/**
 * Pays components
 * 
 * No redirection nor database manipulation ( insert, update, delete ) here
 * 
 * 
 * 
 */
class paysComponents extends myFrontModuleComponents
{

  public function executeShow()
  {
    $query = $this->getShowQuery();
    
    $this->pays = $this->getRecord($query);
  }

  public function executeShowlistExcursion()
  {
    $query = $this->getShowQuery();
    $this->pays = $this->getRecord($query);
    $query = Doctrine_Core::getTable('Produit')->createQuery();
    $query->addWhere('type_produit = ?', 'excursion');
    $query->addWhere('pays_id = ?', $this->pays->getId());
    //$pays =
    $this->produitPager = $this->getPager($query);
  }

  public function executeShowlistCroisiere()
  {
    $query = $this->getShowQuery();

    $this->pays = $this->getRecord($query);
    $query = Doctrine_Core::getTable('Produit')->createQuery();
    $query->addWhere('type_produit = ?', 'croisiere');
    $query->addWhere('pays_id = ?', $this->pays->getId());
    //$pays =
    $this->produitPager = $this->getPager($query);
  }


}
